<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Eigen: Eigen::GeneralizedSelfAdjointEigenSolver&lt; MatrixType_ &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="eigendoxy.css" rel="stylesheet" type="text/css">
<!--  -->
<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Eigen_Silly_Professor_64x64.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname"><a href="http://eigen.tuxfamily.org">Eigen</a>
   &#160;<span id="projectnumber">3.4.90 (git rev 67eeba6e720c5745abc77ae6c92ce0a44aa7b7ae)</span>
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.svg"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classEigen_1_1GeneralizedSelfAdjointEigenSolver.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="classEigen_1_1GeneralizedSelfAdjointEigenSolver-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Eigen::GeneralizedSelfAdjointEigenSolver&lt; MatrixType_ &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__DenseLinearSolvers__chapter.html">Dense linear problems and decompositions</a> &raquo; <a class="el" href="group__DenseLinearSolvers__Reference.html">Reference</a> &raquo; <a class="el" href="group__Eigenvalues__Module.html">Eigenvalues module</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename MatrixType_&gt;<br />
class Eigen::GeneralizedSelfAdjointEigenSolver&lt; MatrixType_ &gt;</h3>

<p>Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem. </p>
<p>This is defined in the Eigenvalues module.</p><div class="fragment"><div class="line"><span class="preprocessor">#include &lt;Eigen/Eigenvalues&gt;</span> </div>
</div><!-- fragment --><dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">MatrixType_</td><td>the type of the matrix of which we are computing the eigendecomposition; this is expected to be an instantiation of the <a class="el" href="classEigen_1_1Matrix.html" title="The matrix class, also used for vectors and row-vectors.">Matrix</a> class template.</td></tr>
  </table>
  </dd>
</dl>
<p>This class solves the generalized eigenvalue problem \( Av = \lambda Bv \). In this case, the matrix \( A \) should be selfadjoint and the matrix \( B \) should be positive definite.</p>
<p>Only the <b>lower</b> <b>triangular</b> <b>part</b> of the input matrix is referenced.</p>
<p>Call the function <a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#a724764fe196612b752042692156ed023" title="Computes generalized eigendecomposition of given matrix pencil.">compute()</a> to compute the eigenvalues and eigenvectors of a given matrix. Alternatively, you can use the <a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#ad08a2daa46bf7c329432bee51927982c" title="Constructor; computes generalized eigendecomposition of given matrix pencil.">GeneralizedSelfAdjointEigenSolver(const MatrixType&amp;, const MatrixType&amp;, int)</a> constructor which computes the eigenvalues and eigenvectors at construction time. Once the eigenvalue and eigenvectors are computed, they can be retrieved with the <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#aaf4ed4172a517a4b9f0ab222f629e261" title="Returns the eigenvalues of given matrix.">eigenvalues()</a> and <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a837627aecb3ba7ed40a2e1bfa3806d08" title="Returns the eigenvectors of given matrix.">eigenvectors()</a> functions.</p>
<p>The documentation for <a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#ad08a2daa46bf7c329432bee51927982c" title="Constructor; computes generalized eigendecomposition of given matrix pencil.">GeneralizedSelfAdjointEigenSolver(const MatrixType&amp;, const MatrixType&amp;, int)</a> contains an example of the typical use of this class.</p>
<dl class="section see"><dt>See also</dt><dd>class <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html" title="Computes eigenvalues and eigenvectors of selfadjoint matrices.">SelfAdjointEigenSolver</a>, class <a class="el" href="classEigen_1_1EigenSolver.html" title="Computes eigenvalues and eigenvectors of general matrices.">EigenSolver</a>, class <a class="el" href="classEigen_1_1ComplexEigenSolver.html" title="Computes eigenvalues and eigenvectors of general complex matrices.">ComplexEigenSolver</a> </dd></dl>
</div><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for Eigen::GeneralizedSelfAdjointEigenSolver&lt; MatrixType_ &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classEigen_1_1GeneralizedSelfAdjointEigenSolver__inherit__graph.png" border="0" usemap="#aEigen_1_1GeneralizedSelfAdjointEigenSolver_3_01MatrixType___01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="aEigen_1_1GeneralizedSelfAdjointEigenSolver_3_01MatrixType___01_4_inherit__map" id="aEigen_1_1GeneralizedSelfAdjointEigenSolver_3_01MatrixType___01_4_inherit__map">
<area shape="rect" title="Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem." alt="" coords="5,409,204,589"/>
<area shape="rect" href="classEigen_1_1SelfAdjointEigenSolver.html" title="Computes eigenvalues and eigenvectors of selfadjoint matrices." alt="" coords="7,5,203,361"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a724764fe196612b752042692156ed023"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html">GeneralizedSelfAdjointEigenSolver</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#a724764fe196612b752042692156ed023">compute</a> (const MatrixType &amp;matA, const MatrixType &amp;matB, int options=<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4">ComputeEigenvectors</a>|<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f">Ax_lBx</a>)</td></tr>
<tr class="memdesc:a724764fe196612b752042692156ed023"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes generalized eigendecomposition of given matrix pencil.  <a href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#a724764fe196612b752042692156ed023">More...</a><br /></td></tr>
<tr class="separator:a724764fe196612b752042692156ed023"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a192647b027848d25f4a4ac5965aeb8f0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#a192647b027848d25f4a4ac5965aeb8f0">GeneralizedSelfAdjointEigenSolver</a> ()</td></tr>
<tr class="memdesc:a192647b027848d25f4a4ac5965aeb8f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor for fixed-size matrices.  <a href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#a192647b027848d25f4a4ac5965aeb8f0">More...</a><br /></td></tr>
<tr class="separator:a192647b027848d25f4a4ac5965aeb8f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad08a2daa46bf7c329432bee51927982c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#ad08a2daa46bf7c329432bee51927982c">GeneralizedSelfAdjointEigenSolver</a> (const MatrixType &amp;matA, const MatrixType &amp;matB, int options=<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4">ComputeEigenvectors</a>|<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f">Ax_lBx</a>)</td></tr>
<tr class="memdesc:ad08a2daa46bf7c329432bee51927982c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor; computes generalized eigendecomposition of given matrix pencil.  <a href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#ad08a2daa46bf7c329432bee51927982c">More...</a><br /></td></tr>
<tr class="separator:ad08a2daa46bf7c329432bee51927982c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a248d3362abd1ddd9b3a7ec858c427d05"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#a248d3362abd1ddd9b3a7ec858c427d05">GeneralizedSelfAdjointEigenSolver</a> (<a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a7c52c334cec08ff33425e4b3f5474eb8">Index</a> size)</td></tr>
<tr class="memdesc:a248d3362abd1ddd9b3a7ec858c427d05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor, pre-allocates memory for dynamic-size matrices.  <a href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#a248d3362abd1ddd9b3a7ec858c427d05">More...</a><br /></td></tr>
<tr class="separator:a248d3362abd1ddd9b3a7ec858c427d05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classEigen_1_1SelfAdjointEigenSolver')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html">Eigen::SelfAdjointEigenSolver&lt; MatrixType_ &gt;</a></td></tr>
<tr class="memitem:a62817de3e0cbf009a02c7ece6a0e3d64 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memTemplParams" colspan="2">template&lt;typename InputType &gt; </td></tr>
<tr class="memitem:a62817de3e0cbf009a02c7ece6a0e3d64 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html">SelfAdjointEigenSolver</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a62817de3e0cbf009a02c7ece6a0e3d64">compute</a> (const <a class="el" href="structEigen_1_1EigenBase.html">EigenBase</a>&lt; InputType &gt; &amp;matrix, int options=<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4">ComputeEigenvectors</a>)</td></tr>
<tr class="memdesc:a62817de3e0cbf009a02c7ece6a0e3d64 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes eigendecomposition of given matrix.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#a62817de3e0cbf009a02c7ece6a0e3d64">More...</a><br /></td></tr>
<tr class="separator:a62817de3e0cbf009a02c7ece6a0e3d64 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe520161701f5f585bcc4cedb8657bd1 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html">SelfAdjointEigenSolver</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#afe520161701f5f585bcc4cedb8657bd1">computeDirect</a> (const MatrixType &amp;matrix, int options=<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4">ComputeEigenvectors</a>)</td></tr>
<tr class="memdesc:afe520161701f5f585bcc4cedb8657bd1 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes eigendecomposition of given matrix using a closed-form algorithm.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#afe520161701f5f585bcc4cedb8657bd1">More...</a><br /></td></tr>
<tr class="separator:afe520161701f5f585bcc4cedb8657bd1 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a297893df7098c43278d385e4d4e23fe4 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html">SelfAdjointEigenSolver</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a297893df7098c43278d385e4d4e23fe4">computeFromTridiagonal</a> (const <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a0fc5528f6a59753d3003907f3a88548f">RealVectorType</a> &amp;diag, const <a class="el" href="classEigen_1_1Matrix.html">SubDiagonalType</a> &amp;subdiag, int options=<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4">ComputeEigenvectors</a>)</td></tr>
<tr class="memdesc:a297893df7098c43278d385e4d4e23fe4 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the eigen decomposition from a tridiagonal symmetric matrix.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#a297893df7098c43278d385e4d4e23fe4">More...</a><br /></td></tr>
<tr class="separator:a297893df7098c43278d385e4d4e23fe4 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf4ed4172a517a4b9f0ab222f629e261 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a0fc5528f6a59753d3003907f3a88548f">RealVectorType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#aaf4ed4172a517a4b9f0ab222f629e261">eigenvalues</a> () const</td></tr>
<tr class="memdesc:aaf4ed4172a517a4b9f0ab222f629e261 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the eigenvalues of given matrix.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#aaf4ed4172a517a4b9f0ab222f629e261">More...</a><br /></td></tr>
<tr class="separator:aaf4ed4172a517a4b9f0ab222f629e261 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a837627aecb3ba7ed40a2e1bfa3806d08 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classEigen_1_1Matrix.html">EigenvectorsType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a837627aecb3ba7ed40a2e1bfa3806d08">eigenvectors</a> () const</td></tr>
<tr class="memdesc:a837627aecb3ba7ed40a2e1bfa3806d08 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the eigenvectors of given matrix.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#a837627aecb3ba7ed40a2e1bfa3806d08">More...</a><br /></td></tr>
<tr class="separator:a837627aecb3ba7ed40a2e1bfa3806d08 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61de3180668fc0439251d832ebfe6b27 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__enums.html#ga85fad7b87587764e5cf6b513a9e0ee5e">ComputationInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a61de3180668fc0439251d832ebfe6b27">info</a> () const</td></tr>
<tr class="memdesc:a61de3180668fc0439251d832ebfe6b27 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reports whether previous computation was successful.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#a61de3180668fc0439251d832ebfe6b27">More...</a><br /></td></tr>
<tr class="separator:a61de3180668fc0439251d832ebfe6b27 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b3ddd941804994eaeede8cb65698bfd inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top">MatrixType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a4b3ddd941804994eaeede8cb65698bfd">operatorInverseSqrt</a> () const</td></tr>
<tr class="memdesc:a4b3ddd941804994eaeede8cb65698bfd inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the inverse square root of the matrix.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#a4b3ddd941804994eaeede8cb65698bfd">More...</a><br /></td></tr>
<tr class="separator:a4b3ddd941804994eaeede8cb65698bfd inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86020f7dece7dc114c8696af5617c792 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top">MatrixType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a86020f7dece7dc114c8696af5617c792">operatorSqrt</a> () const</td></tr>
<tr class="memdesc:a86020f7dece7dc114c8696af5617c792 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the positive-definite square root of the matrix.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#a86020f7dece7dc114c8696af5617c792">More...</a><br /></td></tr>
<tr class="separator:a86020f7dece7dc114c8696af5617c792 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57b9403646ff5ee26b86e3821c08e729 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a57b9403646ff5ee26b86e3821c08e729">SelfAdjointEigenSolver</a> ()</td></tr>
<tr class="memdesc:a57b9403646ff5ee26b86e3821c08e729 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor for fixed-size matrices.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#a57b9403646ff5ee26b86e3821c08e729">More...</a><br /></td></tr>
<tr class="separator:a57b9403646ff5ee26b86e3821c08e729 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9cf17478ced5a7d5b8391bb10873fac inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memTemplParams" colspan="2">template&lt;typename InputType &gt; </td></tr>
<tr class="memitem:af9cf17478ced5a7d5b8391bb10873fac inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#af9cf17478ced5a7d5b8391bb10873fac">SelfAdjointEigenSolver</a> (const <a class="el" href="structEigen_1_1EigenBase.html">EigenBase</a>&lt; InputType &gt; &amp;matrix, int options=<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4">ComputeEigenvectors</a>)</td></tr>
<tr class="memdesc:af9cf17478ced5a7d5b8391bb10873fac inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor; computes eigendecomposition of given matrix.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#af9cf17478ced5a7d5b8391bb10873fac">More...</a><br /></td></tr>
<tr class="separator:af9cf17478ced5a7d5b8391bb10873fac inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7a97741f1db4b17f7a00211667db5e2 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#ac7a97741f1db4b17f7a00211667db5e2">SelfAdjointEigenSolver</a> (<a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a7c52c334cec08ff33425e4b3f5474eb8">Index</a> size)</td></tr>
<tr class="memdesc:ac7a97741f1db4b17f7a00211667db5e2 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor, pre-allocates memory for dynamic-size matrices.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#ac7a97741f1db4b17f7a00211667db5e2">More...</a><br /></td></tr>
<tr class="separator:ac7a97741f1db4b17f7a00211667db5e2 inherit pub_methods_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_types_classEigen_1_1SelfAdjointEigenSolver"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classEigen_1_1SelfAdjointEigenSolver')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html">Eigen::SelfAdjointEigenSolver&lt; MatrixType_ &gt;</a></td></tr>
<tr class="memitem:a7c52c334cec08ff33425e4b3f5474eb8 inherit pub_types_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="namespaceEigen.html#a62e77e0933482dafde8fe197d9a2cfde">Eigen::Index</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a7c52c334cec08ff33425e4b3f5474eb8">Index</a></td></tr>
<tr class="separator:a7c52c334cec08ff33425e4b3f5474eb8 inherit pub_types_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a346d14d83fcf669a85810209b758feae inherit pub_types_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structEigen_1_1NumTraits.html">NumTraits</a>&lt; <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a846b7e7de3b117ffcf4226d04ecec77b">Scalar</a> &gt;::Real&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a346d14d83fcf669a85810209b758feae">RealScalar</a></td></tr>
<tr class="memdesc:a346d14d83fcf669a85810209b758feae inherit pub_types_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Real scalar type for <code>MatrixType_</code>.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#a346d14d83fcf669a85810209b758feae">More...</a><br /></td></tr>
<tr class="separator:a346d14d83fcf669a85810209b758feae inherit pub_types_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fc5528f6a59753d3003907f3a88548f inherit pub_types_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top">typedef internal::plain_col_type&lt; MatrixType, <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a346d14d83fcf669a85810209b758feae">RealScalar</a> &gt;::type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a0fc5528f6a59753d3003907f3a88548f">RealVectorType</a></td></tr>
<tr class="memdesc:a0fc5528f6a59753d3003907f3a88548f inherit pub_types_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type for vector of eigenvalues as returned by <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#aaf4ed4172a517a4b9f0ab222f629e261" title="Returns the eigenvalues of given matrix.">eigenvalues()</a>.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#a0fc5528f6a59753d3003907f3a88548f">More...</a><br /></td></tr>
<tr class="separator:a0fc5528f6a59753d3003907f3a88548f inherit pub_types_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a846b7e7de3b117ffcf4226d04ecec77b inherit pub_types_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top"><a id="a846b7e7de3b117ffcf4226d04ecec77b"></a>
typedef MatrixType::Scalar&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a846b7e7de3b117ffcf4226d04ecec77b">Scalar</a></td></tr>
<tr class="memdesc:a846b7e7de3b117ffcf4226d04ecec77b inherit pub_types_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scalar type for matrices of type <code>MatrixType_</code>. <br /></td></tr>
<tr class="separator:a846b7e7de3b117ffcf4226d04ecec77b inherit pub_types_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_attribs_classEigen_1_1SelfAdjointEigenSolver"><td colspan="2" onclick="javascript:toggleInherit('pub_static_attribs_classEigen_1_1SelfAdjointEigenSolver')"><img src="closed.png" alt="-"/>&#160;Static Public Attributes inherited from <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html">Eigen::SelfAdjointEigenSolver&lt; MatrixType_ &gt;</a></td></tr>
<tr class="memitem:aefe08bf9db5a3ff94a241c56fe6e2870 inherit pub_static_attribs_classEigen_1_1SelfAdjointEigenSolver"><td class="memItemLeft" align="right" valign="top">static const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#aefe08bf9db5a3ff94a241c56fe6e2870">m_maxIterations</a></td></tr>
<tr class="memdesc:aefe08bf9db5a3ff94a241c56fe6e2870 inherit pub_static_attribs_classEigen_1_1SelfAdjointEigenSolver"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of iterations.  <a href="classEigen_1_1SelfAdjointEigenSolver.html#aefe08bf9db5a3ff94a241c56fe6e2870">More...</a><br /></td></tr>
<tr class="separator:aefe08bf9db5a3ff94a241c56fe6e2870 inherit pub_static_attribs_classEigen_1_1SelfAdjointEigenSolver"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a192647b027848d25f4a4ac5965aeb8f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a192647b027848d25f4a4ac5965aeb8f0">&#9670;&nbsp;</a></span>GeneralizedSelfAdjointEigenSolver() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html">Eigen::GeneralizedSelfAdjointEigenSolver</a>&lt; MatrixType_ &gt;::<a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html">GeneralizedSelfAdjointEigenSolver</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor for fixed-size matrices. </p>
<p>The default constructor is useful in cases in which the user intends to perform decompositions via <a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#a724764fe196612b752042692156ed023" title="Computes generalized eigendecomposition of given matrix pencil.">compute()</a>. This constructor can only be used if <code>MatrixType_</code> is a fixed-size matrix; use <a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#a248d3362abd1ddd9b3a7ec858c427d05" title="Constructor, pre-allocates memory for dynamic-size matrices.">GeneralizedSelfAdjointEigenSolver(Index)</a> for dynamic-size matrices. </p>

</div>
</div>
<a id="a248d3362abd1ddd9b3a7ec858c427d05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a248d3362abd1ddd9b3a7ec858c427d05">&#9670;&nbsp;</a></span>GeneralizedSelfAdjointEigenSolver() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html">Eigen::GeneralizedSelfAdjointEigenSolver</a>&lt; MatrixType_ &gt;::<a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html">GeneralizedSelfAdjointEigenSolver</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a7c52c334cec08ff33425e4b3f5474eb8">Index</a>&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor, pre-allocates memory for dynamic-size matrices. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Positive integer, size of the matrix whose eigenvalues and eigenvectors will be computed.</td></tr>
  </table>
  </dd>
</dl>
<p>This constructor is useful for dynamic-size matrices, when the user intends to perform decompositions via <a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#a724764fe196612b752042692156ed023" title="Computes generalized eigendecomposition of given matrix pencil.">compute()</a>. The <code>size</code> parameter is only used as a hint. It is not an error to give a wrong <code>size</code>, but it may impair performance.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#a724764fe196612b752042692156ed023" title="Computes generalized eigendecomposition of given matrix pencil.">compute()</a> for an example </dd></dl>

</div>
</div>
<a id="ad08a2daa46bf7c329432bee51927982c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad08a2daa46bf7c329432bee51927982c">&#9670;&nbsp;</a></span>GeneralizedSelfAdjointEigenSolver() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html">Eigen::GeneralizedSelfAdjointEigenSolver</a>&lt; MatrixType_ &gt;::<a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html">GeneralizedSelfAdjointEigenSolver</a> </td>
          <td>(</td>
          <td class="paramtype">const MatrixType &amp;&#160;</td>
          <td class="paramname"><em>matA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const MatrixType &amp;&#160;</td>
          <td class="paramname"><em>matB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>options</em> = <code><a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4">ComputeEigenvectors</a>|<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f">Ax_lBx</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor; computes generalized eigendecomposition of given matrix pencil. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">matA</td><td>Selfadjoint matrix in matrix pencil. Only the lower triangular part of the matrix is referenced. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">matB</td><td>Positive-definite matrix in matrix pencil. Only the lower triangular part of the matrix is referenced. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">options</td><td>A or-ed set of flags {<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4">ComputeEigenvectors</a>,<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9afd06633f270207c373875fd7ca03e906">EigenvaluesOnly</a>} | {<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f">Ax_lBx</a>,<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a9a7d9813cec527e299a36b749b0f7e1e">ABx_lx</a>,<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a9870817d373c41ba0dc7f6b5ab0895b8">BAx_lx</a>}. Default is <a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4">ComputeEigenvectors</a>|<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f">Ax_lBx</a>.</td></tr>
  </table>
  </dd>
</dl>
<p>This constructor calls <a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#a724764fe196612b752042692156ed023" title="Computes generalized eigendecomposition of given matrix pencil.">compute(const MatrixType&amp;, const MatrixType&amp;, int)</a> to compute the eigenvalues and (if requested) the eigenvectors of the generalized eigenproblem \( Ax = \lambda B x \) with <em>matA</em> the selfadjoint matrix \( A \) and <em>matB</em> the positive definite matrix \( B \). Each eigenvector \( x \) satisfies the property \( x^* B x = 1 \). The eigenvectors are computed if <em>options</em> contains ComputeEigenvectors.</p>
<p>In addition, the two following variants can be solved via <code>options:</code> </p><ul>
<li><code>ABx_lx:</code> \( ABx = \lambda x \)</li>
<li><code>BAx_lx:</code> \( BAx = \lambda x \)</li>
</ul>
<p>Example: </p><div class="fragment"><div class="line"><a class="code" href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">MatrixXd</a> X = <a class="code" href="classEigen_1_1DenseBase.html#ae814abb451b48ed872819192dc188c19">MatrixXd::Random</a>(5,5);</div>
<div class="line"><a class="code" href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">MatrixXd</a> A = X + X.transpose();</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;Here is a random symmetric matrix, A:&quot;</span> &lt;&lt; endl &lt;&lt; A &lt;&lt; endl;</div>
<div class="line">X = <a class="code" href="classEigen_1_1DenseBase.html#ae814abb451b48ed872819192dc188c19">MatrixXd::Random</a>(5,5);</div>
<div class="line"><a class="code" href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">MatrixXd</a> B = X * X.transpose();</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;and a random positive-definite matrix, B:&quot;</span> &lt;&lt; endl &lt;&lt; B &lt;&lt; endl &lt;&lt; endl;</div>
<div class="line"> </div>
<div class="line">GeneralizedSelfAdjointEigenSolver&lt;MatrixXd&gt; es(A,B);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;The eigenvalues of the pencil (A,B) are:&quot;</span> &lt;&lt; endl &lt;&lt; es.eigenvalues() &lt;&lt; endl;</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;The matrix of eigenvectors, V, is:&quot;</span> &lt;&lt; endl &lt;&lt; es.eigenvectors() &lt;&lt; endl &lt;&lt; endl;</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">double</span> lambda = es.eigenvalues()[0];</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;Consider the first eigenvalue, lambda = &quot;</span> &lt;&lt; lambda &lt;&lt; endl;</div>
<div class="line"><a class="code" href="group__matrixtypedefs.html#ga8554c6170729f01c7572574837ecf618">VectorXd</a> v = es.eigenvectors().col(0);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;If v is the corresponding eigenvector, then A * v = &quot;</span> &lt;&lt; endl &lt;&lt; A * v &lt;&lt; endl;</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;... and lambda * B * v = &quot;</span> &lt;&lt; endl &lt;&lt; lambda * B * v &lt;&lt; endl &lt;&lt; endl;</div>
<div class="ttc" id="aclassEigen_1_1DenseBase_html_ae814abb451b48ed872819192dc188c19"><div class="ttname"><a href="classEigen_1_1DenseBase.html#ae814abb451b48ed872819192dc188c19">Eigen::DenseBase::Random</a></div><div class="ttdeci">static const RandomReturnType Random()</div><div class="ttdef"><b>Definition:</b> Random.h:114</div></div>
<div class="ttc" id="agroup__matrixtypedefs_html_ga8554c6170729f01c7572574837ecf618"><div class="ttname"><a href="group__matrixtypedefs.html#ga8554c6170729f01c7572574837ecf618">Eigen::VectorXd</a></div><div class="ttdeci">Matrix&lt; double, Dynamic, 1 &gt; VectorXd</div><div class="ttdoc">Dynamic×1 vector of type double.</div><div class="ttdef"><b>Definition:</b> Matrix.h:501</div></div>
<div class="ttc" id="agroup__matrixtypedefs_html_ga99b41a69f0bf64eadb63a97f357ab412"><div class="ttname"><a href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">Eigen::MatrixXd</a></div><div class="ttdeci">Matrix&lt; double, Dynamic, Dynamic &gt; MatrixXd</div><div class="ttdoc">Dynamic×Dynamic matrix of type double.</div><div class="ttdef"><b>Definition:</b> Matrix.h:501</div></div>
</div><!-- fragment --><p> Output: </p><pre class="fragment">Here is a random symmetric matrix, A:
  1.36 -0.816  0.521   1.43 -0.144
-0.816 -0.659  0.794 -0.173 -0.406
 0.521  0.794 -0.541  0.461  0.179
  1.43 -0.173  0.461  -1.43  0.822
-0.144 -0.406  0.179  0.822  -1.37
and a random positive-definite matrix, B:
  0.132  0.0109 -0.0512  0.0674  -0.143
 0.0109    1.68    1.13   -1.12   0.916
-0.0512    1.13     2.3   -2.14    1.86
 0.0674   -1.12   -2.14    2.69   -2.01
 -0.143   0.916    1.86   -2.01    1.68

The eigenvalues of the pencil (A,B) are:
  -227
  -3.9
-0.837
 0.101
  54.2
The matrix of eigenvectors, V, is:
   14.2   -1.03  0.0766 -0.0273   -8.36
 0.0546  -0.115   0.729   0.478   0.374
  -9.23   0.624 -0.0165   0.499    3.01
   7.88     1.3   0.225   0.109   -3.85
   20.8   0.805  -0.567 -0.0828   -8.73

Consider the first eigenvalue, lambda = -227
If v is the corresponding eigenvector, then A * v = 
 22.8
-28.8
 19.8
 21.9
-25.9
... and lambda * B * v = 
 22.8
-28.8
 19.8
 21.9
-25.9

</pre><dl class="section see"><dt>See also</dt><dd><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#a724764fe196612b752042692156ed023" title="Computes generalized eigendecomposition of given matrix pencil.">compute(const MatrixType&amp;, const MatrixType&amp;, int)</a> </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a724764fe196612b752042692156ed023"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a724764fe196612b752042692156ed023">&#9670;&nbsp;</a></span>compute()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html">GeneralizedSelfAdjointEigenSolver</a>&lt; MatrixType &gt; &amp; <a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html">Eigen::GeneralizedSelfAdjointEigenSolver</a>&lt; MatrixType &gt;::compute </td>
          <td>(</td>
          <td class="paramtype">const MatrixType &amp;&#160;</td>
          <td class="paramname"><em>matA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const MatrixType &amp;&#160;</td>
          <td class="paramname"><em>matB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>options</em> = <code><a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4">ComputeEigenvectors</a>|<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f">Ax_lBx</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Computes generalized eigendecomposition of given matrix pencil. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">matA</td><td>Selfadjoint matrix in matrix pencil. Only the lower triangular part of the matrix is referenced. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">matB</td><td>Positive-definite matrix in matrix pencil. Only the lower triangular part of the matrix is referenced. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">options</td><td>A or-ed set of flags {<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4">ComputeEigenvectors</a>,<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9afd06633f270207c373875fd7ca03e906">EigenvaluesOnly</a>} | {<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f">Ax_lBx</a>,<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a9a7d9813cec527e299a36b749b0f7e1e">ABx_lx</a>,<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a9870817d373c41ba0dc7f6b5ab0895b8">BAx_lx</a>}. Default is <a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a7f7d17fba3c9bb92158e346d5979d0f4">ComputeEigenvectors</a>|<a class="el" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9a5eb11a88a4bd445f58f1b24598d3848f">Ax_lBx</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to <code>*this</code> </dd></dl>
<p>According to <code>options</code>, this function computes eigenvalues and (if requested) the eigenvectors of one of the following three generalized eigenproblems:</p><ul>
<li><code>Ax_lBx:</code> \( Ax = \lambda B x \)</li>
<li><code>ABx_lx:</code> \( ABx = \lambda x \)</li>
<li><code>BAx_lx:</code> \( BAx = \lambda x \) with <em>matA</em> the selfadjoint matrix \( A \) and <em>matB</em> the positive definite matrix \( B \). In addition, each eigenvector \( x \) satisfies the property \( x^* B x = 1 \).</li>
</ul>
<p>The <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#aaf4ed4172a517a4b9f0ab222f629e261" title="Returns the eigenvalues of given matrix.">eigenvalues()</a> function can be used to retrieve the eigenvalues. If <code>options</code> contains ComputeEigenvectors, then the eigenvectors are also computed and can be retrieved by calling <a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html#a837627aecb3ba7ed40a2e1bfa3806d08" title="Returns the eigenvectors of given matrix.">eigenvectors()</a>.</p>
<p>The implementation uses <a class="el" href="classEigen_1_1LLT.html" title="Standard Cholesky decomposition (LL^T) of a matrix and associated features.">LLT</a> to compute the Cholesky decomposition \( B = LL^* \) and computes the classical eigendecomposition of the selfadjoint matrix \( L^{-1} A (L^*)^{-1} \) if <code>options</code> contains Ax_lBx and of \( L^{*} A L \) otherwise. This solves the generalized eigenproblem, because any solution of the generalized eigenproblem \( Ax = \lambda B x \) corresponds to a solution \( L^{-1} A (L^*)^{-1} (L^* x) = \lambda (L^* x) \) of the eigenproblem for \( L^{-1} A (L^*)^{-1} \). Similar statements can be made for the two other variants.</p>
<p>Example: </p><div class="fragment"><div class="line"><a class="code" href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">MatrixXd</a> X = <a class="code" href="classEigen_1_1DenseBase.html#ae814abb451b48ed872819192dc188c19">MatrixXd::Random</a>(5,5);</div>
<div class="line"><a class="code" href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">MatrixXd</a> A = X * X.transpose();</div>
<div class="line">X = <a class="code" href="classEigen_1_1DenseBase.html#ae814abb451b48ed872819192dc188c19">MatrixXd::Random</a>(5,5);</div>
<div class="line"><a class="code" href="group__matrixtypedefs.html#ga99b41a69f0bf64eadb63a97f357ab412">MatrixXd</a> B = X * X.transpose();</div>
<div class="line"> </div>
<div class="line">GeneralizedSelfAdjointEigenSolver&lt;MatrixXd&gt; es(A,B,<a class="code" href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9afd06633f270207c373875fd7ca03e906">EigenvaluesOnly</a>);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;The eigenvalues of the pencil (A,B) are:&quot;</span> &lt;&lt; endl &lt;&lt; es.eigenvalues() &lt;&lt; endl;</div>
<div class="line">es.compute(B,A,<span class="keyword">false</span>);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;The eigenvalues of the pencil (B,A) are:&quot;</span> &lt;&lt; endl &lt;&lt; es.eigenvalues() &lt;&lt; endl;</div>
<div class="ttc" id="agroup__enums_html_ggae3e239fb70022eb8747994cf5d68b4a9afd06633f270207c373875fd7ca03e906"><div class="ttname"><a href="group__enums.html#ggae3e239fb70022eb8747994cf5d68b4a9afd06633f270207c373875fd7ca03e906">Eigen::EigenvaluesOnly</a></div><div class="ttdeci">@ EigenvaluesOnly</div><div class="ttdef"><b>Definition:</b> Constants.h:404</div></div>
</div><!-- fragment --><p> Output: </p><pre class="fragment">The eigenvalues of the pencil (A,B) are:
  0.0289
   0.299
    2.11
    8.64
2.08e+03
The eigenvalues of the pencil (B,A) are:
0.000481
   0.116
   0.473
    3.34
    34.6
</pre><dl class="section see"><dt>See also</dt><dd><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html#ad08a2daa46bf7c329432bee51927982c" title="Constructor; computes generalized eigendecomposition of given matrix pencil.">GeneralizedSelfAdjointEigenSolver(const MatrixType&amp;, const MatrixType&amp;, int)</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="GeneralizedSelfAdjointEigenSolver_8h_source.html">GeneralizedSelfAdjointEigenSolver.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceEigen.html">Eigen</a></li><li class="navelem"><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html">GeneralizedSelfAdjointEigenSolver</a></li>
    <li class="footer">Generated on Thu Apr 21 2022 13:07:55 for Eigen by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
